<script setup lang="ts">
import { ref, onMounted, nextTick } from "vue";
import { refreshTodosApi } from "@/api/user";
import Axios from "axios";
defineOptions({
  name: "Welcome"
});
const productList = ref([]);

const getCardListData = async () => {
  try {
    const { data } = await refreshTodosApi();
    productList.value = data.list;
  } catch (e) {
    console.log(e);
  } finally {
  }
};

onMounted(() => {
  // Axios("https://jsonplaceholder.typicode.com/todos").then(response =>
  //   console.log(response, "*******")
  // );

  fetch("https://jsonplaceholder.typicode.com/todos", {
    method: "GET",
    headers: {
      Referer: "https://yourdomain.com/"
    }
  });
  getCardListData();
  console.log(productList.value);
});
</script>

<template>
  <h1>Pure-Admin-Thin（非国际化版本）</h1>
</template>
